class Page {
    constructor($pageParent, routeCtx) {
        this.$pageParent = $pageParent
        this.routeCtx = routeCtx
    }

    pLoadData() {
        return Promise.resolve(true)
    }

    pBuild() {

    }

    open() {
        this.$pageParent.show()
        console.log("Open " + this.routeCtx.path)
    }

    close() {
    }
}

exports.Page = Page

class NotFoundPage extends Page {
    pBuild() {
        this.$pageParent
            .append("<div class='page page-not-found'>内容不存在</div>")
    }
}

exports.NotFoundPage = NotFoundPage
